﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DFGK_WMS.Model.Models
{
    /// <summary>
    /// 货品与包装关系表，容器与容器的关系，容器与货品的关系，货品与货品的关系等记录表
    /// </summary>
    [Table("T_PackageDetail")]
    public class PackageDetail:BaseEntity
    {
        /// <summary>
        /// 状态：0-失效；1-生效
        ///多用   0未开始，1未完成2已完成
        /// </summary>
        public int? Status
        {
            get;
            set;
        } = 1;

        /// <summary>
        /// 关联BillId
        /// </summary>
        public long RelatedOrderDetailId
        {
            get;
            set;
        }

        [MaxLength(60)]
        public string OrderSn { get; set; }

        /// <summary>
        /// 物料Id
        /// </summary>
        public long? MaterialId
        {
            get;
            set;
        }

        /// <summary>
        /// 物料号
        /// </summary>
        [MaxLength(60)]
        public string MaterialCode
        {
            get;
            set;
        }

        /// <summary>
        /// 物料名称
        /// </summary>
        [MaxLength(60)]
        public string MaterialName
        {
            get;
            set;
        }

        [MaxLength(60)]
        public string BatchNO
        {
            get;
            set;
        }

        /// <summary>
        /// 数量
        /// </summary>
        [Column(TypeName = "decimal(18,4)")]
        public decimal? QTY
        {
            get;
            set;
        } = 0;


        /// <summary>
        /// 物料基本单位Id
        /// </summary>
        public long? UnitId
        {
            get;
            set;
        }

        /// <summary>
        /// 物料基本单位
        /// </summary>
        [MaxLength(60)]
        public string UnitName
        {
            get;
            set;
        }

        /// <summary>
        /// 备注
        /// </summary>
        [MaxLength(50)]
        public string Remark
        {
            get;
            set;
        }

        /// <summary>
        /// 包装条码
        /// </summary>
        [MaxLength(60)]
        public string PackageCode
        {
            get;
            set;
        }

        /// <summary>
        /// 货品数量
        /// </summary>
        [Column(TypeName = "decimal(18,4)")]
        public decimal? SkuNum
        {
            get; set;
        } = 0;

        /// <summary>
        /// 缓存口
        /// </summary>
        [MaxLength(60)]
        public string CachePortCode { get; set; }
    }
}
